package v1

import (
	"github.com/icetech233/gin"
	"wms/service/impl"
	"wms/service/request"
	"wms/service/response"
)

func (a *simApi) List(c *gin.Context) {
	queryParams := c.Request.URL.Query()
	arg := new(request.QuerySimRequest)
	arg.MSISDN = queryParams.Get("MSISDN")
	arg.ICCID = queryParams.Get("ICCID")
	d, err := impl.SimSrvImpl.List(c, arg)
	if err != nil {
		response.Fail(-1, err.Error(), arg, c)
		return
	}
	response.OkWithData(d, c)
}
